cd vendor/nercdtv/3rdParty;
ls | grep -v Android.mk |xargs rm -rf;
cd ../../../;
mkdir -p ../lock/compiling;
unzip -o $1 -d $(pwd)/vendor/nercdtv/3rdParty -x Android.mk;
source build/envsetup.sh;lunch gk6525v100_SEC-eng;
mkdir /home/yigerui/ftp/download/$2;


#rm -fr out;
mmm vendor/nercdtv/3rdParty |tee /home/yigerui/ftp/download/$2/build_$2.log;

mkdir -p /home/yigerui/ftp/download/$2/system/;

mkdir -p /home/yigerui/ftp/download/$2/vendor/;

cp -r out/target/product/gk6525v100/system/app /home/yigerui/ftp/download/$2/system;
cp -r out/target/product/gk6525v100/vendor/app /home/yigerui/ftp/download/$2/vendor;

cp -r out/target/product/gk6525v100/vendor/bin /home/yigerui/ftp/download/$2/system;
cp -r out/target/product/gk6525v100/vendor/lib64 /home/yigerui/ftp/download/$2/vendor;

cp -r out/target/product/gk6525v100/system/bin /home/yigerui/ftp/download/$2/system;
cp -r out/target/product/gk6525v100/system/lib64 /home/yigerui/ftp/download/$2/vendor;

rm -fr ../lock/compiling;
